home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / scriptToolProperties.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  3.6 KB  |  125 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date: Jan 30, 1996
  22. //  Author:        ms
  23. //
  24. //  Description:
  25. //      These procs create the controls for a script tool property sheet.
  26. //      See also scriptToolValues.mel for procs that set the state of the
  27. //      property sheet.
  28. //
  29. //  Input Arguments:
  30. //      None.
  31. //
  32. //  Return Value:
  33. //      None.
  34. //
  35.  
  36. proc scriptToolSetCallbacks( string $parent )
  37. //
  38. //  Description:
  39. //      Set the callbacks for all of the controls in the dialog.
  40. //      Modifying the context will force scriptToolValues() to be called
  41. //
  42. //
  43. {
  44.     setParent $parent;
  45.  
  46.     checkBoxGrp -e
  47.         -on1 "scriptCtx -e -cumulativeLists true `currentCtx`"
  48.         -of1 "scriptCtx -e -cumulativeLists false `currentCtx`"
  49.         cumulativeListsWidget;
  50.  
  51.     checkBoxGrp -e
  52.         -on1 "scriptCtx -e -expandSelectionList true `currentCtx`"
  53.         -of1 "scriptCtx -e -expandSelectionList false `currentCtx`"
  54.         expandSelectionListWidget;
  55.  
  56.     checkBoxGrp -e
  57.         -on1 "scriptCtx -e -showManipulators true `currentCtx`"
  58.         -of1 "scriptCtx -e -showManipulators false `currentCtx`"
  59.         showManipulatorsWidget;
  60.  
  61.     checkBoxGrp -e
  62.         -on1 "scriptCtx -e -exitUponCompletion true `currentCtx`"
  63.         -of1 "scriptCtx -e -exitUponCompletion false `currentCtx`"
  64.         exitUponCompletionWidget;
  65.  
  66.     checkBoxGrp -e
  67.         -on1 "scriptCtx -e -enableRootSelection true `currentCtx`"
  68.         -of1 "scriptCtx -e -enableRootSelection false `currentCtx`"
  69.         showRootSelectWidget;
  70.  
  71.     textFieldGrp -e
  72.         -cc "scriptCtx -e -title \"#1\" `currentCtx`"
  73.         titleWidget;
  74.  
  75.     textFieldGrp -e
  76.         -cc "scriptCtx -e -finalCommandScript \"#1\" `currentCtx`"
  77.         finalCommandScriptWidget;
  78. }
  79.  
  80. global proc scriptToolProperties()
  81. //
  82. //  Description:
  83. //      This procedure builds the property sheet and assigns callbacks to
  84. //      its controls.  The state of the controls are set in scriptToolValues().
  85. //
  86. //
  87. {
  88.     string $parent = `toolPropertyWindow -q -location`;
  89.     setUITemplate -pushTemplate DefaultTemplate;
  90.     setParent $parent;
  91.  
  92.     columnLayout scriptTool;
  93.  
  94.       $parent = `setParent -query`;
  95.       separator -style "none";
  96.  
  97.       textFieldGrp -l "Title" titleWidget;
  98.       textFieldGrp -l "Final Command Script" finalCommandScriptWidget;
  99.  
  100.       checkBoxGrp -ncb 1
  101.           -l1 "Keep Active"
  102.           -v1 on
  103.           cumulativeListsWidget;
  104.       checkBoxGrp -ncb 1
  105.           -l1 "Expand Selection"
  106.           -v1 on
  107.           expandSelectionListWidget;
  108.       checkBoxGrp -ncb 1
  109.           -l1 "Hierarchy Selection"
  110.           -v1 on
  111.           showRootSelectWidget;
  112.       checkBoxGrp -ncb 1
  113.           -l1 "Show Manipulators"
  114.           -v1 on
  115.           showManipulatorsWidget;
  116.       checkBoxGrp -ncb 1 -l1 "Exit Upon Completion" -v1 on
  117.           exitUponCompletionWidget;
  118.  
  119.     setParent ..; // scriptTool
  120.  
  121.     setUITemplate -popTemplate;
  122.     scriptToolSetCallbacks( $parent );
  123. }
  124.  
  125.